<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<link id='theme' rel='stylesheet' href='static/css/viewcustom.css'/>

<div id="customer_container" class="container">
	<div class="subtitle">基本信息</div>
	<div class="info1">
		<ul>
			<li>企业名称：${customer.customname}</li>
			<li>状态：<c:choose>
						<c:when test="${ customer.customstatus == 1}">
							<font color="green">启用</font>
						</c:when>
						<c:when test="${ customer.customstatus == 0}">
							<font color="red">停用</font>
						</c:when>
					</c:choose>
			</li>
			<li>企业类型：${customer.customtypename }</li>
			<li>企业主页：${ customer.siteurl}</li>
		</ul>
		<div class="clear"></div>
	</div>
	<div class="subtitle">门户信息</div>
	<div class="info2">
		<ul>
			<li>法人代表：${ customer.bossname}</li>
			<li>注册日期：<fmt:formatDate value="${customer.regdatetime}" pattern="yyyy-MM-dd"/></li>
			<li>证件类型：${customer.cardtypename }</li>
			<li>证件号码：${customer.cardnum }</li>
			<li>国家：${customer.country }</li>
			<li>省/地区：
				<c:if test="${provinceList != null}">
					<c:forEach items="${provinceList}" var="province">
						<c:if test="${customer.province == province.provinceid }">
							${province.province}
						</c:if>
					</c:forEach>
				</c:if>
			</li>
			<li>区：
				<c:if test="${areaList != null}">
					<c:forEach items="${areaList}" var="area">
						<c:if test="${customer.area == area.areaid }">
							${area.area}
						</c:if>
					</c:forEach>
				</c:if>
			</li>
			<li>城市：
				<c:if test="${cityList != null}">
					<c:forEach items="${cityList}" var="city">
						<c:if test="${customer.city == city.cityid }">
							${city.city}
						</c:if>
					</c:forEach>
				</c:if>
			</li>
			<li>公司电话：${customer.companytel }</li>
			<li>公司传真：${customer.companyfax }</li>
			<li>公司地址：${customer.companyaddress}</li>
			<li>备注：${customer.memo }</li>
		</ul>
		<div class="clear"></div>
	</div>

	<div class="subtitle">联系人信息</div>
	<div class="info3">
		<ul>
			<c:choose>
				<c:when test="${customer.contactList != null and customer.contactList.size() > 0 }">
					<c:forEach items="${customer.contactList }" var="contact">
						<li>
	            			<div>姓名：${contact.contactname }</div>
	            			<div>电话：${contact.contacttel }</div>
	            			<div>传真：${contact.contactfax }</div>
	            			<div>邮箱：${contact.contactemail }</div>
	            			<div>职务：${contact.contactrole }</div>
            			</li>
					</c:forEach>
				</c:when>
				<c:when test="${customer.contactList.size() == 0 }">
					<li>没有任何联系人</li>
				</c:when>
			</c:choose>
		</ul>
		<div class="clear"></div>
	</div>
	<div class="goback"><input type="button" onclick="$('#formbox').dialog('close');" value="返回" /> </div>
</div>